package com.example.demo.service;

import com.example.demo.dao.UserMapper;
import com.example.demo.model.Student;
import com.example.demo.service.IService.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

@Service
@Slf4j
public class UserService implements IUserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<Student> getStudentList(String name) {
        List<Student> ret;
        if(!StringUtils.hasLength(name)){
            log.warn("UserService getStudentList name为空");
        }

        ret=userMapper.selectStudentInfoListByName(name);
        return ret;
    }

}
